# -*-coding:utf-8-*-
"""
@project: python-project
@Time: 2024-07-12 15:40
@Author: Loneliness_Burial
@File: numpy矩阵乘法.py
@Motto: 深情不改必坠死海
@software: pycharm
@version: python 3.7
"""

import numpy as np

# v1 = np.arange(3).reshape(1, 3)
# print(v1)
# v2 = np.arange(6).reshape((3, 2))
# print(v2)
# v3 = np.array([0 * 0 + 1 * 2 + 2 * 4, 0 * 1 + 1 * 3 + 2 * 5])
# print(v3)
# # 矩阵点乘方法一
# v4 = np.dot(v1, v2)
# print(v4)
# # 矩阵点乘方法二
# v5 = np.matrix(v1) * np.matrix(v2)
# print(v5)


# v1 = np.arange(5).reshape(1, 5)
# print(v1)
# v2 = np.arange(15).reshape(5, 3)
# print(v2)
# v3 = np.matrix(v1) * np.matrix(v2)
# print(v3)

v1 = [9, 13, 14, 18, 19]
v2 = np.arange(20).reshape(5, 4)
v3 = np.matrix(v1) * np.matrix(v2)
print(v3)
